
[dbo].[Component_Interest_Category]
CREATE TABLE [dbo].[Component_Interest_Category]
(
[ComponentCode] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[InterestCategoryID] [numeric] (18, 0) NOT NULL,
[ComponentID] [numeric] (18, 0) NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Component_Interest_Category] ADD CONSTRAINT [PK_Component_Interest_Category] PRIMARY KEY CLUSTERED ([ComponentCode], [InterestCategoryID], [ComponentID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [ix_Component_Interest_Category] ON [dbo].[Component_Interest_Category] ([ComponentCode]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [ix_Component_Interest_Category_1] ON [dbo].[Component_Interest_Category] ([InterestCategoryID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Component_Interest_Category] ADD CONSTRAINT [FK_ComponentIntCat_Comp] FOREIGN KEY ([ComponentCode]) REFERENCES [dbo].[Component_Ref] ([ComponentCode])
GO
ALTER TABLE [dbo].[Component_Interest_Category] ADD CONSTRAINT [FK_ComponentIntCat_IntCat] FOREIGN KEY ([InterestCategoryID]) REFERENCES [dbo].[Interest_Category] ([InterestCategoryID])
GO
GRANT REFERENCES ON [dbo].[Component_Interest_Category] TO [IMIS]
GRANT SELECT ON [dbo].[Component_Interest_Category] TO [IMIS]
GRANT INSERT ON [dbo].[Component_Interest_Category] TO [IMIS]
GRANT DELETE ON [dbo].[Component_Interest_Category] TO [IMIS]
GRANT UPDATE ON [dbo].[Component_Interest_Category] TO [IMIS]
GO